package deibay.server.frontend.commands;

import deibay.messages.BiddingItemMsg;
import deibay.messages.Message;
import deibay.server.eventargs.BiddingItemEventArg;
import deibay.server.events.BiddingItemEvent;
import deibay.server.frontend.FrontEndCore;
import deibay.users.User;

public class BiddingItemCommand extends Command{

	public BiddingItemCommand(User user, Message msg) {
		super(user, msg);		
	}

	@Override
	public void execute() {		
		String id = ((BiddingItemMsg)message).getId();
		int value = ((BiddingItemMsg)message).getValue();
		FrontEndCore.getInstance().getServerConnection().send(new BiddingItemEvent(new BiddingItemEventArg(user, id, value)));		
	}

}
